POV-Ray : Newsgroups : povray.general : IES file format : Re: IES file format Server Time
2 Nov 2024 15:24:19 EDT (-0400)
  Re: IES file format  
From: Peter Popov
Date: 29 Jan 2004 09:15:52
Message: <cn4i10dpa0m0j20fsblmo9938ljsssvbe4@4ax.com>
On Thu, 29 Jan 2004 14:33:44 +0100, "Gianluca Massaccesi"
<gia### [at] tinit> wrote:

>Thank you. This could be an idea. IES format gives luminosity in function of
>horizontal and vertical angle.

So it's a mercator projection then? This should make things more
simple. Just convert it to something POV can read. Probably the best
format is 16-bit grayscale PNG with 16-bit alpha. Make the gray
channel 100% white and store the luminosity as transparency in the
alpha channel. I.e. the more luminance, the more transparent the image
map will be and the more light will shine through, which is what we
want.

In terms of POV code it looks quite simple once you have the PNG file:

#macro IES_Light_Source (Location, Color, Transparency_Map_File) {
   union {
      light_source { 0 color Color }
      sphere {
         0, 0.001
         pigment {
            image_map {
               png Transparency_Map_File
               map_type 1
            }
         }
         no_image
      }
      translate Location
   }
}

Then use the macro like this:

IES_Light_Source ( <10,100,-20>, rgb 100, "foo_file.png" )

You can also use a plain simple 16-bit PNG without the alpha channel,
then use image_pattern to create a transparency map, but that's just
nitpicking :)

There might be some errors in the code since I am typing it directly
in the newsreader, but you get the idea. 


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.